/** 创建路由实例 */
import { Router, createRouter, createWebHashHistory, RouteRecordRaw } from "vue-router";

const routes: RouteRecordRaw[] = [
	{
		path: "/",
		name: "LayoutView",
		component: () => import("@/layout/index.vue"),
		children: [
			{
				path: "/",
				name: "HomeView",
				component: () => import("@/views/home/index.vue"),
			},
			{
				path: "/data_browsing",
				name: "DataBrowsingView",
				component: () => import("@/views/dataBrowsing/index.vue"),
			},
			{
				path: "/basic_search",
				name: "BasicSearchView",
				component: () => import("@/views/basicSearch/index.vue"),
			},
			{
				path: "/advanced_search",
				name: "AdvancedSearchView",
				component: () => import("@/views/advancedSearch/index.vue"),
			},
			{
				path: "/dashboard",
				name: "DashboardView",
				component: () => import("@/views/dashboard/index.vue"),
			},
		],
	},
];

const router: Router = createRouter({
	history: createWebHashHistory(),
	routes,
	strict: true,
});

export default router;
